import { asyncRouteMap } from "./_import";
import my from "./pageConfig/_my.js";
import login from "./pageConfig/_login.js";
import home from "./pageConfig/_home.js";
import branchOffice from "./pageConfig/_branchOffice.js";
let routers = [...login, ...my, ...home, ...branchOffice];

asyncRouteMap(routers);
routers = routers = [
  ...routers,
  {
    path: "/",
    redirect: "/home",
  },
  {
    path: "/404",
    component: () => import("../pages/404.vue"),
    name: "404",
    meta: { title: "404 - 页面未找到" },
  },
  {
    path: "/:pathMatch(.*)",
    redirect: "/404",
  },
];

export default routers;
